package com.wisecoach.gatewayplus.session;

import org.hyperledger.fabric.client.Gateway;

/**
 * 默认实现
 * {@code @author:} wisecoach
 * {@code @date:} 2023/3/2 下午8:08
 * {@code @version:} 1.0.0
 */
public class GatewayContextImpl implements GatewayContext {

    private Gateway gateway;
    private GatewayContext oldGateway;

    @Override
    public Gateway getGateway() {
        return gateway;
    }

    @Override
    public void setGateway(Gateway gateway) {
        this.gateway = gateway;
    }

    @Override
    public GatewayContext getOldGateway() {
        return oldGateway;
    }

    @Override
    public void setOldGateway(GatewayContext oldGateway) {
        this.oldGateway = oldGateway;
    }

    @Override
    public void clearGateway() {
        gateway = null;
    }
}
